package com.example.ssmxuankeback.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("enrollment")
@Schema(name = "Enrollment", description = "选课记录表")
public class Enrollment {
    @TableId("enroll_id")
    @Schema(description = "选课记录id")
    private Long enrollId;       // 选课记录ID
    @Schema(description = "学号")
    private Long studentId;       // 学生ID（S2025001）
    @Schema(description = "课程id")
    private Long courseId;    // 课程ID
    @Schema(description = "选课时间", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime enrollTime; // 精确到毫秒的选课时间
    @Schema(description = "选课状态(0-退选,1-有效)")
    private Integer status;      // 状态（1有效/0退选）
}